﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebBanHang
{
    public class CurrentContext
    {
        public static bool IsLogged
        {
            get { return HttpContext.Current.Request.Cookies["UserDangNhap"] != null; }
        }

        public static string UserName
        {
            get { return HttpContext.Current.Request.Cookies["UserDangNhap"].Value; }
        }

        public static DNGH  don
        {
            get { return HttpContext.Current.Session["UserDangNhap"] as DNGH ; }
            set { HttpContext.Current.Session["UserDangNhap"] = value; }
        }

        public static Member Member
        {
            get { return HttpContext.Current.Session["UserDangNhap"] as Member; }
            set { HttpContext.Current.Session["UserDangNhap"] = value; }
        }
    }
}